<template>
	<view>
		<!-- 预约表订单详情 -->
		<u-navbar :is-back="true" title="订单详情" :border-bottom="false" :background="{backgroundColor: '#00a8ff'}">
		</u-navbar>
		<view class="bg">
			<view class="u-padding-left-26 u-p-r-26 u-margin-top-20 u-m-b-20 block">
				<view class="liP">
					<p>咨询方式
						<text style="float: right;" v-show="orderShow.type==0">图文咨询</text>
						<text style="float: right;" v-show="orderShow.type==1">语音咨询</text>
						<text style="float: right;" v-show="orderShow.type==2">视频咨询</text>
					</p>
					<p>咨询时间<text style="float: right;">
						{{$u.timeFormat(orderShow.createtime, 'yyyy.mm.dd hh:MM')}} (预约)</text></p>
				</view>
			</view>
			<view class="u-padding-left-26 u-p-r-26 u-margin-top-20 u-m-b-20 block">
				<view class="liP">
					<p>呢称<text style="float: right;">{{name}}</text></p>
					<p>性别<text style="float: right;">{{orderShow.gender==1?'女':'男'}}</text></p>
					<p>年龄<text style="float: right;">{{orderShow.age_interval}}</text></p>
					<p>医美史<text style="float: right;">{{orderShow.old}}</text></p>
					<p>期望改善部位<text style="float: right;">{{orderShow.part}}</text></p>
					<p class="">上传照片
						<text v-show="orderShow.images==null" style="float: right;">暂无上传照片</text>
						<view class="u-flex u-m-b-20 viewImg" v-show="orderShow.images!=null">
							<image class="u-flex-1 u-m-l-20 u-m-r-20" style="" mode="" v-for="(item,index) in images"
								:src="oss+item"></image>
							<!-- 	<image class="u-flex-1 " src="../../../../static/goods/p1.jpg"></image>
							<image class="u-flex-1" src="../../../../static/goods/p1.jpg"></image> -->
						</view>
					</p>
					<p>备注<text style="float: right;">{{orderShow.reason}}</text></p>
				</view>
			</view>
			<view class="u-padding-left-26 u-p-r-26 u-margin-top-20 u-m-b-20 block">
				<view class="liP">
					<p>订单状态<text style="float: right;">
							{{orderShow.status}}
						</text></p>
					<p>咨询费<text style="float: right;">{{orderShow.amount}}</text></p>
					<p>订单编号<text style="float: right;">{{orderShow.order_bn}}</text></p>
					<p>下单时间<text style="float: right;">{{$u.timeFormat(orderShow.starttime, 'yyyy.mm.dd hh:MM')}}</text></p>
				</view>
			</view>
			<u-button type="primary" style="width: 80%;margin: 0 auto;" class="u-m-b-26" @click="begin()">开始面诊
			</u-button>
		</view>

	</view>
</template>

<script>
	export default {
		onLoad(e) {
			console.log(e)
			this.name = e.name
			this.$apiVipCentre.detail({
				id: e.id
			}).then((res) => {
				console.log('request success', res);
				console.log(res.data.data)
				this.orderShow = res.data.data;

				console.log(this.orderShow)
				this.images = this.orderShow.images.split(',');



			}).catch((err) => {
				console.log('request fail', err);
			})
		},

		data() {
			return {
				name: '',
				orderShow: '',
				oss: 'http://zjmeifeng.oss-cn-beijing.aliyuncs.com/',
				images: [],
			}
		},
		methods: {
			begin() {
				console.log("点击了开始面诊");
			}
		}
	}
</script>

<style scoped lang="scss">
	.bg {
		background-color: #f3f4f5;
	}

	.viewImg image {
		width: 100rpx;
		height: 100rpx;
		border-radius: 10rpx;
	}

	.liP p {
		line-height: 80rpx;
		border-bottom: #e5e5e5 1px solid;
	}

	.liP p:last-child {
		border-bottom: none;
	}

	.block {
		background-color: #FFFFFF;
	}
</style>
